EMA pullback strategyA solid EMA pullback strategy for cryptos 15 min chart that uses EMA crossing as signal and pullback as stop loss.
EMA1: shortest period for finding crossing (I find period = 33 profitable for BTCUSD, you can adjust it for other cryptos)
EMA2: 5x period of EMA1, for filtering out some trend reversals
EMA3: 11x period of EMA1, for determining trend direction
Rules are:
Long:
close price > EMA3
EMA1 > EMA3
close price pullbacks below EMA1 and then crosses up EMA1, enter at the first close price above EMA1
lowest pullback close price < EMA2 at the cross up
Short:
close price < EMA3
EMA1 < EMA3
close price pullbacks above EMA1 and then crosses down EMA1, enter at the first close price below EMA1
highest pullback close price > EMA2 at the cross down
Stop-loss at lowest/highest pullback price for long/short
Take profit = 2x stop-loss
Risk management: risk range can be set in the inspector. If the risk is lower than the range, the trade is not taken. if the risk is higher than the range, the position size is adjusted to keep the risk within range.
Cari dalam skrip untuk "stop loss"
8 Whittle DownThe system is designed to short on directionally negative instruments like VXX & SQQQ
The system only shorts, no longs
It enters a pilot position if the system has no trades open at the time is in the late afternoon
It uses a 200-day moving average as a filter and will only short if the price is below the 200 day moving average
The pilot position will only enter with 1/3 ( one third ) of the total expected position size
StopLossPerc sets the stop loss, (1.15) means it is set to a 15% stop loss. -- The Red Line
The system will buy additional shares for a full position if the pilot piston profit target was not reached
The full shares position is set to purchase at a higher price. T2EntTrgPerc sets the buy percentage target for the additional shares. -- The Yellow Line
Each entry has different settable profit targets. T1ProfTrgPerc sets the profit target for the first trade (0.95) is basically set to a 5% profit.
T2ProfTrgPerc sets the profit target for the second trade (0.90) is basically set to a 10% profit. -- The White Line
RED LINE == STOP LOSS LINE
GREENLINE == PROFIT TARGET FOR THE 1ST TRADE
YELLOW LINE == ADD ON SHARES TO THE TRADE
WHITE LINE == PROFIT TARGET FOR THE 1st & 2nd TRADE COMBINED
Let me know if you have any questions and I'll try to clarify
M8 BUY @ END OF DAYI've read a couple of times at a couple of different places that most of the move in the market happens after hours, meaning during non-standard trading hours.
After-market and pre-market hours and have seen data presented showing that systems which bought just before end normal market hours and sold the next morning had really amazing resutls.
But when testing those I found the results to be quite poor compared to the pretty graphs I saw, and after much tweaking and trying different ideas I gave up on the idea until I recently decided to try a new position management system.
The System
Buys at the end of the trading day before the close
Sells the next morning at the open IF THE CLOSE OF THE CURRENT BAR IS HIGHER THAN THE ENTRY PRICE
When the current price is not higher, the system will keep the position open until it EITHER gets stops out or closes on profit <<< this is WHY it has the high win %
The system has a high win ratio because it will keep that one position open until it either reaches profit or stops out
This "system" of waiting, and keeping the trade open, actually turned out to be a fantastic way to kind of put the complete trading strategy in a kind of limbo mode. It either waits for market failure or for a profit.
I don't really care about win % at all, almost always high win % ratio systems are just nonsense. What I look for is a PF -- profit factor of 1.5 or above, and a relatively smooth equity curve. -- This has both.
The Stop Loss setting is set @ .95, meaning a 5% stop loss. The Red Line on the chart is the stop loss line.
There is no set profit target -- it simply takes what the market gives.
Non-Repainting System
This does use a 200D Simple Moving Average as a filter. Like a Green Light / Red Light traffic light, the system will only trade long when the price is above its 200 Moving average.
Here is the code: "F1 = close > sma(security(syminfo.tickerid, "D", close ), MarketFilterLen) // HIGH OF OLD DATA -- SO NO REPAINTING"
I use "close ", so that's data from two days ago, it's fixed, confirmed, non-repainting data from the higher timeframe.
-- I would only suggest using this on direction tickers like SPY, QQQ, SSO, TQQQ, market sectors with additional filters in place.
NIKI MSS BANKNIFTYThis is the strategy version of my old indicator NIKI BANKIFTY. It is more suitable for day trading with a 5 min chart. It is more profitable in BANKNIFTY future. It is based on multiple Supertrend, moving average, Donchain channel, and linear regression. The background color indicates the main trend and the color of the candle represents a short-term trend. The label with TA and SL represents more profitable entry positions. The label RE: LE and RE: SE stands for re-entry positions or signals with less accuracy. Consider the direction of the linear regression line to take trades on re-entry positions. The yellow candle indicates the entry and the blue candle represents the target or stop-loss.
The backtest results are based on BANKNIFTY last year's data. It has an initial capital of 100000 and the size of the lot is 1. The target is 0.3% and stop-loss is 1.5%. It exactly not following the stop loss, the trade will exit based on the Donchain channel breakout. It appears on the chart as a blue candle. The commission paid is 20 cash per trade and the slippage is 5 ticks per trade. Some of the Indian broker's commission is only 10 cash per trade. Adjust the commission as per your broker. Trades are conducted based on the intraday time in India set from 9.20 am to 2.25 pm. All positions will get square off at 3.00 pm. It will execute a maximum of 4 trades per day. All other parameters are suitable for Robo trading with Indian stock brokers.
Contact us using the link given below to obtain access to this indicator.
Ultimate Strategy TemplateHello Traders
As most of you know, I'm a member of the PineCoders community and I sometimes take freelance pine coding jobs for TradingView users.
Off the top of my head, users often want to:
- convert an indicator into a strategy, so as to get the backtesting statistics from TradingView
- add alerts to their indicator/strategy
- develop a generic strategy template which can be plugged into (almost) any indicator
My gift for the community today is my Ultimate Strategy Template
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
For doing so:
1) Find in your indicator where are the conditions printing the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator wether it's a MACD, ZigZag, Pivots, higher-highs, lower-lows or whatever indicator with clear buy and sell conditions
//@version=4
study(title='Moving Average Cross', shorttitle='Moving Average Cross', overlay=true, precision=6, max_labels_count=500, max_lines_count=500)
type_ma1 = input(title="MA1 type", defval="SMA", options= )
length_ma1 = input(10, title = " MA1 length", type=input.integer)
type_ma2 = input(title="MA2 type", defval="SMA", options= )
length_ma2 = input(100, title = " MA2 length", type=input.integer)
// MA
f_ma(smoothing, src, length) =>
iff(smoothing == "RMA", rma(src, length),
iff(smoothing == "SMA", sma(src, length),
iff(smoothing == "EMA", ema(src, length), src)))
MA1 = f_ma(type_ma1, close, length_ma1)
MA2 = f_ma(type_ma2, close, length_ma2)
// buy and sell conditions
buy = crossover(MA1, MA2)
sell = crossunder(MA1, MA2)
plot(MA1, color=color_ma1, title="Plot MA1", linewidth=3)
plot(MA2, color=color_ma2, title="Plot MA2", linewidth=3)
plotshape(buy, title='LONG SIGNAL', style=shape.circle, location=location.belowbar, color=color_ma1, size=size.normal)
plotshape(sell, title='SHORT SIGNAL', style=shape.circle, location=location.abovebar, color=color_ma2, size=size.normal)
/////////////////////////// SIGNAL FOR STRATEGY /////////////////////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Basically, I identified my buy, sell conditions in the code and added this at the bottom of my indicator code
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal , and -1 for the bearish signal
Now you can connect your indicator to the Strategy Template using the method below or that one
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings and in the Data Source field select your 🔌Connector🔌 (which comes from your indicator)
From then, you should start seeing the signals and plenty of other stuff on your chart
🔥 Note that whenever you'll update your indicator values, the strategy statistics and visual on your chart will update in real-time
Settings
- Color Candles : Color the candles based on the trade state (bullish, bearish, neutral)
- Close positions at market at the end of each session : useful for everything but cryptocurrencies
- Session time ranges : Take the signals from a starting time to an ending time
- Close Direction : Choose to close only the longs, shorts, or both
- Date Filter : Take the signals from a starting date to an ending date
- Set the maximum losing streak length with an input
- Set the maximum winning streak length with an input
- Set the maximum consecutive days with a loss
- Set the maximum drawdown (in % of strategy equity)
- Set the maximum intraday loss in percentage
- Limit the number of trades per day
- Limit the number of trades per week
- Stop-loss: None or Percentage or Trailing Stop Percentage or ATR
- Take-Profit: None or Percentage or ATR
- Risk-Reward based on ATR multiple for the Stop-Loss and Take-Profit
This script is open-source so feel free to use it, and optimize it as you want
Alerts
Maybe you didn't know it but alerts are available on strategy scripts.
I added them in this template - that's cool because:
- if you don't know how to code, now you can connect your indicator and get alerts
- you have now a cool template showing you how to create alerts for strategy scripts
Source: www.tradingview.com
I hope you'll like it, use it, optimize it and most importantly....make some optimizations to your indicators thanks to this Strategy template
Special Thanks
Special thanks to @JosKodify as I borrowed a few risk management snippets from his website: kodify.net
Additional features
I thought of plenty of extra filters that I'll add later on this week on this strategy template
Best
Dave
TradingView Alerts to MT4 MT5 - Forex, indices, commoditiesHowdy Algo-Traders! This example script has been created for educational purposes - to present how to use and automatically execute TradingView Alerts on real markets.
I'm posting this script today for a reason. TradingView has just released a new feature of the PineScript language - ALERT() function. Why is it important? It is finally possible to set alerts inside PineScript strategy-type script, without the need to convert the script into study-type. You may say triggering alerts straight from strategies was possible in PineScript before (since June 2020), but it had its limitations. Starting today you can attach alert to any custom event you might want to include in your PineScript code.
With the new feature, it is easier not only to execute strategies, but to maintain codebase - having to update 2 versions of the code with each single modification was... ahem... inconvenient. Moreover, the need to convert strategy into study also meant it was required to rip the code from all strategy...() calls, which carried a lot of useful information, like entry price, position size, and more, definitely influencing results calculated by strategy backtest. So the strategy without these features very likely produced different results than with them. While it was possible to convert these features into study with some advanced "coding gymnastics", it was also quite difficult to test whether those gymnastics didn't introduce serious, bankrupting bugs.
//////
How does this new feature work? It is really simple. On your custom events in the code like "GoLong" or "GoShort", create a string variable containing all the values you need inside your alert and this string variable will be your alert's message. Then, invoke brand new alert() function and that's it (see lines 67 onwards in the script). Set it up in CreateAlert popup and enjoy. Alerts will trigger on candle close as freq= parameter specifies. Detailed specification of the new alert() function can be found in TradingView's PineScript Reference (www.tradingview.com), but there's nothing more than message= and freq= parameters. Nothing else is needed, it is very simple. Yet powerful :)
//////
Alert syntax in this script is prepared to work with TradingConnector. Strategy here is not too complex, but also not the most basic one: it includes full exits, partial exits, stop-losses and it also utilizes dynamic variables calculated by the code (such as stop-loss price). This is only an example use case, because you could handle variety of other functionalities as well: conditional entries, pending entries, pyramiding, hedging, moving stop-loss to break-even, delivering alerts to multiple brokers and more.
//////
This script is a spin-off from my previous work, posted over a year ago here: Some comments on strategy parameters have been discussed there, but let me copy-paste most important points:
* Commission is taken into consideration.
* Slippage is intentionally left at 0. Due to shorter than 1 second delivery time of TradingConnector, slippage is practically non-existing.
* This strategy is NON-REPAINTING and uses NO TRAILING-STOP or any other feature known to be causing problems.
* The strategy was backtested on EURUSD 6h timeframe, will perform differently on other markets and timeframes.
Despite the fact this strategy seems to be still profitable, it is not guaranteed it will continue to perform well in the future. Remember the no.1 rule of backtesting - no matter how profitable and good looking a script is, it only tells about the past. There is zero guarantee the same strategy will get similar results in the future.
Full specs of TradingView alerts and how to set them up can be found here: www.tradingview.com
Multi Time Frame Buy&Sell V4.0 [BACKTEST]Hi guys,this indicator Developed for Intraday and multi Time Frame Trading. Note: Invite only Script.Request to me Access permission to test this.
*** THIS IS STUDY VERSION ***
Time Frame : can use for 15 min / 30 min / 1h / 4h time
15 min configuration is best result for bitcoin and ethereum .
This can be used : Crypto Currency/ Bitcoins / ethereum ,Forex,currencies ,Index ,Commodity Gold / silver , Oil Market and in Equity / Futures
ETHUSDT Futures 15min
BTCUSDT Futures 15min:
GOLD /USD FOREX 15min:
HOW IT WORKS:
this indicator analyze EMA&SMA support and resistance then combine with pivot point and fibo levels is used to calculate the signals.and finally show entry label on
chart with target point and stop loss
HOW TO USE:
Creating a signal is as simple as adding the indicator called to your chart(buy or sell)label and background color change ( green=buy / red = sell)
green line is target and black line is stop loss.
in top of setting page you can see noise filter option . that can change it to get better result and reduce noise. in setting can set 3 target level and stoploss
NOT:all information show to info panel in chart.
strategy tester : enabled .All you can test this in live market in any segment.
NOT: can to change noise filter in setting setup until to get best result.
Choose any Date Month Year to Current Date and check the results below in the Strategy Tester.
REPAINT/NO REPAINT : No Repaint ,entery labal(buy or sell) and Background Color wont change. In the current candle position wait for the candle to close to see the
stability.
"Set alert": Select "Once per bar close" for your alert options.
There are 5 alerts:
- BUY
- SELL
- BUY OR SELL (for free TV users)
- take profit
- stop loss
Review and Feedback.Thank you!
Any issues report to me to Fix.Thank you!
how To Get access : Use the link below to obtain access to this indicator or PM us to obtain access.
Support/ Resistance with H1 ATR - strategy mainline versionThis script using ATR (average true range) with source hl2 for create Support/ Resistance line
The color meaning:
- Green = Support line
- Red = Resistance line
Signal:
- If close price breakout Resistance line -> LONG signal will been active.
- If close price breakout Support line -> SHORT signal will been active.
Input setting:
Recommended default setting.
- Factor: amplitude for create Support/ Resistance line.
- Length: length of ATR.
- Offset: number of bar for check sideway or choppy market.
- Take profit: if you want test close position by profit.
- Stop loss: should not be missed.
- Open Position with Stop-Market type:
+ Open LONG position with high price and type Stop-Market.
+ Open SHORT position with low price and type Stop-Market.
Strategy setting:
Recommended default setting if you trade on Binance Futures or change Comission if you trade on another exchange.
Best backtest if:
- Max drawdown less than 10%.
- Min backtest time: 6 month.
- Avg profit: 10%/ month when no leverage is used.
Alert version:
1 - Select create new alert
2 - Condition:
+ eb BUY -> LONG signal
+ eb BUY close -> close LONG position
+ eb SELL -> SHORT signal
+ eb SELL close -> close SHORT position
3 - Option: recommended using only. Because the signal will be more accurate if the price close breakout successfully.
+ Always put stop loss position to avoid PUMP/ DUMP market.
// Note: alert version not free, send for me a private message on TradingView to get price and gain access.
Recommended:
- Using in M30, M45, H1 timeframe with default setting.
- Symbol: BTC
- Exchange: Binance Futures
- Order size: 10% wallet balance, maximum 25% wallet balance.
- Leverage: X2-X5, maximum X10.
---> I using 10% wallet balance and X2 only.
RSI and Smoothed RSI Bull Div Strategy [BigBitsIO]This strategy focuses on finding a low RSI value, then targeting a low Smoothed RSI value while the price is below the low RSI in the lookback period to trigger a buy signal.
Features Take Profit, Stop Loss, and Plot Target inputs. As well as many inputs to manage how the RSI and Smoothed RSI are configured within the strategy.
Explanation of all the inputs
Take Profit %: % change in price from position entry where strategy takes profit
Stop Loss %: % change in price from position entry where strategy stops losses
RSI Lookback Period: # of candles used to calculate RSI
Buy Below Lowest Low In RSI Divergence Lookback Target %: % change in price from lowest RSI candle in divergence lookback if set
Source of Buy Below Target Price: Source of price (close, open, high, low, etc..) used to calculated buy below %
Smoothed RSI Lookback Period: # of candles used to calculate RSI
RSI Currently Below: Value the current RSI must be below to trigger a buy
RSI Divergence Lookback Period: # of candles used to lookback for lowest RSI in the divergence lookback period
RSI Lowest In Divergence Lookback Currently Below: Require the lowest RSI in the divergence lookback to be below this value
RSI Sell Above: If take profit or stop loss is not hit, the position will sell when RSI rises above this value
Minimum SRSI Downtrend Length: Require that the downtrend length of the SRSI be this value or higher to trigger a buy
Smoothed RSI Currently Below: Value the current SRSI must be below to trigger a buy
Scripting Tutorial B - TManyMA - Commission/FeesThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually.
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish , bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter . Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy.
- Strategy only enters long positions with a market order when MA crossovers occur.
- Strategy exits positions when crossunders occur.
- Trades 100% of the equity with one order/position by default.
- Ability to disable trading certain crosses with input checks.
- Ability to exit trades with a take profit or stop loss.
- User input to allow quick changes to the take profit or stop loss percentages.
- Strategy now calculates on every tick
- Strategy also includes fixed commission values based on Coinbase standard order fees
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
Support/Resistance Algo-Tradeing StrategyThis strategy Automates Support and resistance trading and a tight trailing stop loss technique. The support and resistance levels are calculated from previous highs and lows; these levels are used to make two types of trades:
1. Break out trades, taking a trade if the market is able to push through a support or resistance level.
2. Liquidity pool rejection, also known as a stop loss hunt. When the market is brought past a key level (to take out stop losses) which traders (usually institutions) use to enter, which then reverses back through the support/resistance level where the strategy enters a trade.
An optional "volatility filter" may be used when on a suitable market. This means that trades are only entered when there is suitable volatility.
A tight stop loss is kept so most trades lose, but winning trades are left to run much further. So this is a very reliable profitable strategy on many markets.
For a limited time I will provide access to this strategy for free as it is not yet complete, there is still testing to do and I would appreciate any feedback.
Strategy - Bobo's Pivot ATR SwingHi there, welcome to my pivot ATR swing bot. I put this out there with source code hidden to see what ideas others have to use it. Also if there are any coders of trading systems out there who wanted to work with me to put this into a form that could trade automatically we could both use... I'd welcome that kind of collaboration and will happily share the underlying rules of this and the more highly developed version that isn't public.
But as it is, the signals are free for all, use them as you wish and at your own risk. If you want to discuss the code, strategy or ideas, I'm around fairly regularly just message.
The bot is fairly simple design that will give you signals for long and short intraday/week on equity futures / CFDs / ETFs. You'll see it backtests fairly well on an hourly SPX500 chart as configured. You will need to set up certain parameters to account for any different timeframes and markets you wish to trade. For me it's most effective pick out a few good swing trades per week in equity futures. However part of the idea of putting this in the public domain is to see if other people will have good but different ideas how to use it. Please share with me if so :).
The basic concept is a series of 3 lines that define the area and movement we wish to trade. The daily pivot is the central line (blue). We are looking to capture reversions to this middle line from extremes (red and green). Therefore the bot will signal exit at the close of every candle that has passed through the pivot.
Entry is decided by the outer bands around the blue line. Red is the top band, green the bottom. As configured, these are simply placed a daily ATR value apart, centred around the pivot. You can change this quite a lot though, so let's go through the settings:
Pivot Timeframe - simple, a daily pivot is calculated from the previous day's values (high + low + close)/3 . BUt the same calculation can be applied to any length candle, day, minute, month or whatever. This makes the middle target line more or less responsive to recent price action.
ATR Band Timeframe - When we calculate the average range, we need to know what candle length makes up our series. Daily candles is the default, but you can change that here.
ATR Lookback - When we calculate the average range, we need to know how many instances of the timeframe (day, minute, hour etc) we look back to create an average. The lower the lookback value, the more the width of the bands (the distance from pivot) will change quickly based on the volatility of previous candles. The higher the lookback value, the more stable the band width will be to recent volatility.
ATR divisor - The ATR value above is divided by this value, before being added or subtracted to the pivot to create the red and green lines. Default value is 2, and this means the distance from the red band to the green band will be equal to 1 ATR, as calculated according to the parameters above. Setting this to 1 would mean that each band is one ATR away from pivot (ie the bands got wider apart). Set this to 4, and it means that it is only 1/2 an ATR from green to red.
Take Profit / Stop Loss. - We know what a stop and profit target are, but worth nothing that a 0 value disables stop loss or profit targets. The bot will still close positions when crossing pivot.
Also, note the mintick value of the instrument you apply this to. For example for the CFD chart SPX500 the mintick value is 0.1. So a 100 value for stop loss = 10 points on SPX500. but if you were to trade the same thing basically, but the emini future ES, the mintick value is 0.25. So for a 10 point stop on the ES chart, you would need a value of 40 in this bot. US30 and YM have convenient mintick values of 1. Currencies can be a bit of a nightmare :).
Forex Master (EUR/USD)ATTENTION:
This is a symmetrical algorithm designed only for trading EUR/USD on the 1h time frame. For other currency pairs and time frames, you need to re-calibrate the RSI-EMAs as well as the profit targets and stop losses.
BACKTEST CONDITIONS:
Initial equity = $100,000 (no leverage)
Order size = 100% of equity
Pyramiding = disabled
TRADING RULES:
Long entry = EMA20(RSI10) cross> 50
Profit limit = 50 pips
Stop loss = 50 pips
Short entry = EMA30(RSI30) cross< 50
Profit limit = 50 pips
Stop loss = 50 pips
Long entry = Short exit
Short entry = long exit
DISCLAIMER: None of my ideas and posts are investment advice. Past performance is not an indication of future results. This strategy was constructed with the benefit of hindsight and its future performance cannot be guaranteed.
Dumb Money ConceptUse in 1 minute timeframe
1. Strategy setup
Name & sizing: Trades 25% of your account on each signal, assumes 0.04% commission + 2‑tick slippage, starts with a notional 10 million.
Timing: Only makes decisions at each 1‑minute bar close, and processes orders at bar‑close.
2. Optional filters (both default to off)
Volatility filter : when on, requires that yesterday’s ATR (average true range) ≥ your threshold before even placing an entry.
Trend filter : when on, only allows a “long” if yesterday’s close was above its daily MA, or a “short” if below.
You can toggle each filter on/off and adjust ATR period, ATR threshold, and MA length through the inputs at the top.
3. Signal logic (“dumb money” wicks)
At today’s first minute, the script pulls yesterday’s open, high, low, close, ATR and MA—using only completed daily bars so nothing repaints.
It measures the size of yesterday’s upper wick (close→high) vs. lower wick (open→low).
If the upper wick was longer, that sets a long bias (“dumb money” got shaken out at the top). Otherwise it sets a short bias.
4. Calculate where to place orders
On that same first minute of day:
Entry: a limit order at half of yesterday’s range away from today’s open (below the open for longs, above for shorts).
Stop‑loss: one full‑range (×1.0) below today’s open for longs (and above for shorts).
Take‑profit: 1.236× yesterday’s range above today’s open for longs (and below for shorts).
5. Apply filters before sending entry
Before actually placing that limit order, it checks:
Volatility: if enabled, requires yesterday’s ATR ≥ your “Min Daily ATR.”
Trend: if enabled, requires yesterday’s close to lie on the same side of its daily MA as your signal.
If either filter fails, no order is sent.
6. Give the limit order up to 24 hours to fill
The code remembers the bar‑index when the order went live.
If 1440 one‑minute bars pass (≈24 h) without a fill, it automatically cancels the unfilled entry—so stale orders don’t hang around.
7. Once filled, TP/SL manage the trade
As soon as your limit order executes, two opposite orders are placed:
A take‑profit at the 1.236× range level
A stop‑loss at the –1.0× range level
One cancels the other when triggered.
8. No overnight risk
On the very first minute of the next daily bar, any position still open is force‑closed (“Time Exit”)
Fibonacci + TP/SL Strategy [Backtest]✅ Key Features Added and Adjusted:
Fibonacci Retracement Levels:
Automatically calculated based on the last 100 bars' high/low
Plotted levels: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%
Extension targets: 161.8%, 261.8%, 423.6%
Buy/Sell Signal Logic:
Buy: Price is between 78.6% and 38.2% levels
Sell: Price is between 61.8% and 23.6% levels
Both depend on a can_trade time filter to avoid overtrading
ATR-based Stop-Loss:
Stop-loss dynamically adapts to market volatility:
SL = Entry - ATR * 1.5 (long)
SL = Entry + ATR * 1.5 (short)
Fixed Take-Profit:
Configurable via input: default is 4%
Can be changed in TradingView UI
Golden/Death Cross Indicator (Visual Only):
EMA 50 crossing EMA 200 plotted on chart:
Golden Cross = Buy signal (green triangle)
Death Cross = Sell signal (red triangle)
Weekly Profit Cap:
Prevents new trades if weekly profit exceeds 15%
Resets at the start of every week
Visual Elements:
All Fibonacci levels are plotted
Buy/Sell signals are labeled on the chart (BUY, SELL)
Stoch RSI Crossover Strategy · HTF RELv2StochRSI Strategy V1.2 | Narrow Bands – Crossover-Based Trading Strategy
This strategy is built around the Stochastic RSI indicator on daily candles, using tight entry and exit bands to capture well-defined turning points in price action.
⚙️ Strategy Logic:
Entry (Long):
When the %K line crosses above the %D line, and both are below a defined lower threshold (default: 20) — indicating potential bullish momentum from an oversold state.
Exit (Close):
When the %K line crosses below the %D line, and both are above an upper threshold (default: 80) — indicating waning momentum from an overbought condition.
Stop-Loss:
A fixed stop-loss percentage is calculated from the entry price (default: 10%).
✅ Key Features:
Full synchronization between visual signals (green/red arrows) and actual trade execution.
Clean, focused logic — no external indicators or moving averages required.
Suitable for momentum-based traders seeking precise entries and exits after strong directional moves or extremes.
PowerHouse SwiftEdge AI v2.10 StrategyOverview
The PowerHouse SwiftEdge AI v2.10 Strategy is a sophisticated trading system designed to identify high-probability trade setups in forex, stocks, and cryptocurrencies. By combining multi-timeframe trend analysis, momentum signals, volume confirmation, and smart money concepts (Change of Character and Break of Structure ), this strategy offers traders a robust tool to capitalize on market trends while minimizing false signals. The strategy’s unique “AI” component analyzes trends across multiple timeframes to provide a clear, actionable dashboard, making it accessible for both novice and experienced traders. The strategy is fully customizable, allowing users to tailor its filters to their trading style.
What It Does
This strategy generates Buy and Sell signals based on a confluence of technical indicators and smart money concepts. It uses:
Multi-Timeframe Trend Analysis: Confirms the market’s direction by analyzing trends on the 1-hour (60M), 4-hour (240M), and daily (D) timeframes.
Momentum Filter: Ensures trades align with strong price movements to avoid choppy markets.
Volume Filter: Validates signals with above-average volume to confirm market participation.
Breakout Filter: Requires price to break key levels for added confirmation.
Smart Money Signals (CHoCH/BOS): Identifies reversals (CHoCH) and trend continuations (BOS) based on pivot points.
AI Trend Dashboard: Summarizes trend strength, confidence, and predictions across timeframes, helping traders make informed decisions without needing to analyze complex data manually.
The strategy also plots dynamic support and resistance trendlines, take-profit (TP) levels, and “Get Ready” signals to alert users of potential setups before they fully develop. Trades are executed with predefined take-profit and stop-loss levels for disciplined risk management.
How It Works
The strategy integrates multiple components to create a cohesive trading system:
Multi-Timeframe Trend Analysis:
The strategy evaluates trends on three timeframes (1H, 4H, Daily) using Exponential Moving Averages (EMA) and Volume-Weighted Average Price (VWAP). A trend is considered bullish if the price is above both the EMA and VWAP, bearish if below, or neutral otherwise.
Signals are only generated when the trend on the user-selected higher timeframe aligns with the trade direction (e.g., Buy signals require a bullish higher timeframe trend). This reduces noise and ensures trades follow the broader market context.
Momentum Filter:
Measures the percentage price change between consecutive bars and compares it to a volatility-adjusted threshold (based on the Average True Range ). This ensures trades are taken only during significant price movements, filtering out low-momentum conditions.
Volume Filter (Optional):
Checks if the current volume exceeds a long-term average and shows positive short-term volume change. This confirms strong market participation, reducing the risk of false breakouts.
Breakout Filter (Optional):
Requires the price to break above (for Buy) or below (for Sell) recent highs/lows, ensuring the signal aligns with a structural shift in the market.
Smart Money Concepts (CHoCH/BOS):
Change of Character (CHoCH): Detects potential reversals when the price crosses under a recent pivot high (for Sell) or over a recent pivot low (for Buy) with a bearish or bullish candle, respectively.
Break of Structure (BOS): Confirms trend continuations when the price breaks below a recent pivot low (for Sell) or above a recent pivot high (for Buy) with strong momentum.
These signals are plotted as horizontal lines with labels, making it easy to visualize key levels.
AI Trend Dashboard:
Combines trend direction, momentum, and volatility (ATR) across timeframes to calculate a trend score. Scores above 0.5 indicate an “Up” trend, below -0.5 indicate a “Down” trend, and otherwise “Neutral.”
Displays a table summarizing trend strength (as a percentage), AI confidence (based on trend alignment), and Cumulative Volume Delta (CVD) for market context.
A second table (optional) shows trend predictions for 1H, 4H, and Daily timeframes, helping traders anticipate future market direction.
Dynamic Trendlines:
Plots support and resistance lines based on recent swing lows and highs within user-defined periods (shortTrendPeriod, longTrendPeriod). These lines adapt to market conditions and are colored based on trend strength.
Why This Combination?
The PowerHouse SwiftEdge AI v2.10 Strategy is original because it seamlessly integrates traditional technical analysis (EMA, VWAP, ATR, volume) with smart money concepts (CHoCH, BOS) and a proprietary AI-driven trend analysis. Unlike standalone indicators, this strategy:
Reduces False Signals: By requiring confluence across trend, momentum, volume, and breakout filters, it minimizes trades in choppy or low-conviction markets.
Adapts to Market Context: The ATR-based momentum threshold adjusts dynamically to volatility, ensuring signals remain relevant in both trending and ranging markets.
Simplifies Decision-Making: The AI dashboard distills complex multi-timeframe data into a user-friendly table, eliminating the need for manual analysis.
Leverages Smart Money: CHoCH and BOS signals capture institutional price action patterns, giving traders an edge in identifying reversals and continuations.
The combination of these components creates a balanced system that aligns short-term trade entries with longer-term market trends, offering a unique blend of precision, adaptability, and clarity.
How to Use
Add to Chart:
Apply the strategy to your TradingView chart on a liquid symbol (e.g., EURUSD, BTCUSD, AAPL) with a timeframe of 60 minutes or lower (e.g., 15M, 60M).
Configure Inputs:
Pivot Length: Adjust the number of bars (default: 5) to detect pivot highs/lows for CHoCH/BOS signals. Higher values reduce noise but may delay signals.
Momentum Threshold: Set the base percentage (default: 0.01%) for momentum confirmation. Increase for stricter signals.
Take Profit/Stop Loss: Define TP and SL in points (default: 10 each) for risk management.
Higher/Lower Timeframe: Choose timeframes (60M, 240M, D) for trend filtering. Ensure the chart timeframe is lower than or equal to the higher timeframe.
Filters: Enable/disable momentum, volume, or breakout filters to suit your trading style.
Trend Periods: Set shortTrendPeriod (default: 30) and longTrendPeriod (default: 100) for trendline plotting. Keep below 2000 to avoid buffer errors.
AI Dashboard: Toggle Enable AI Market Analysis to show/hide the prediction table and adjust its position.
Interpret Signals:
Buy/Sell Labels: Green "Buy" or red "Sell" labels indicate trade entries with predefined TP/SL levels plotted.
Get Ready Signals: Yellow "Get Ready BUY" or orange "Get Ready SELL" labels warn of potential setups.
CHoCH/BOS Lines: Aqua (CHoCH Sell), lime (CHoCH Buy), fuchsia (BOS Sell), or teal (BOS Buy) lines mark key levels.
Trendlines: Green/lime (support) or fuchsia/purple (resistance) dashed lines show dynamic support/resistance.
AI Dashboard: Check the top-right table for trend strength, confidence, and CVD. The optional bottom table shows trend predictions (Up, Down, Neutral).
Backtest and Trade:
Use TradingView’s Strategy Tester to evaluate performance. Adjust TP/SL and filters based on results.
Trade manually based on signals or automate with TradingView alerts (set alerts for Buy/Sell labels).
Originality and Value
The PowerHouse SwiftEdge AI v2.10 Strategy stands out by combining multi-timeframe analysis, smart money concepts, and an AI-driven dashboard into a single, user-friendly system. Its adaptive momentum threshold, robust filtering, and clear visualizations empower traders to make confident decisions without needing advanced technical knowledge. Whether you’re a day trader or swing trader, this strategy provides a versatile, data-driven approach to navigating dynamic markets.
Important Notes:
Risk Management: Always use appropriate position sizing and risk management, as the strategy’s TP/SL levels are customizable.
Symbol Compatibility: Test on liquid symbols with sufficient historical data (at least 2000 bars) to avoid buffer errors.
Performance: Backtest thoroughly to optimize settings for your market and timeframe.
Rawstocks 15 Minute ModelRawstocks 15-Minute Model
The Rawstocks 15-Minute Model is a precision intraday trading strategy designed for the US stock market (9:30 AM - 4:00 PM ET), optimized for the 15-minute timeframe. It combines institutional order flow concepts with Fibonacci retracements to identify high-probability reversal setups while enforcing strict risk management and session-based rules.
Key Features
Time-Based Execution
Trading Hours: 9:30 AM - 4:00 PM ET (no new entries after 4:00 PM)
Force Close: All positions auto-exit at 4:30 PM ET (prevents overnight risk)
Entry Logic
Order Block + Fib Confluence:
Identifies institutional order blocks (previous swing highs/lows)
Requires price pullback to 61.8% or 79% Fibonacci level
Liquidity Confirmation:
Waits for stop runs (liquidity sweeps) before reversal entries
Exit Rules
Stop Loss: 1x ATR (14) from entry
Take Profit: 2:1 Risk-Reward (adjustable)
Visual Signals
Green Triangle: Valid long setup (pullback to bullish OB + Fib)
Red Triangle: Valid short setup (pullback to bearish OB + Fib)
Blue/Purple Background: Highlights active trading vs. close period
How It Works
Identify the Setup
Wait for a strong impulse move (break of structure)
Mark the order block (institutional zone)
Confirm Pullback
Price must retrace to 61.8% or 79% Fib level
Must occur within trading hours (9:30 AM - 4:00 PM)
Enter on Confirmation
Long: Break of pullback candle high (stop below recent swing low)
Short: Break of pullback candle low (stop above recent swing high)
Manage the Trade
Trail stop or exit at 2R (risk-to-reward)
All positions close at 4:30 PM sharp
Williams R Zone Scalper v1.0[BullByte]Originality & Usefulness
Unlike standard Williams R cross-over scripts, this strategy layers five dynamic filters—moving-average trend, Supertrend, Choppiness Index, Bollinger Band Width, and volume validation —and presents a real-time dashboard with equity, PnL, filter status, and key indicator values. No other public Pine script combines these elements with toggleable filters and a custom dashboard. In backtests (BTC/USD (Binance), 5 min, 24 Mar 2025 → 28 Apr 2025), adding these filters turned a –2.09 % standalone Williams R into a +5.05 % net winner while cutting maximum drawdown in half.
---
What This Script Does
- Monitors Williams R (length 14) for overbought/oversold reversals.
- Applies up to five dynamic filters to confirm trend strength and volatility direction:
- Moving average (SMA/EMA/WMA/HMA)
- Supertrend line
- Choppiness Index (CI)
- Bollinger Band Width (BBW)
- Volume vs. its 50-period MA
- Plots blue arrows for Long entries (R crosses above –80 + all filters green) and red arrows for Short entries (R crosses below –20 + all filters green).
- Optionally sets dynamic ATR-based stop-loss (1.5×ATR) and take-profit (2×ATR).
- Shows a dashboard box with current position, equity, PnL, filter status, and real-time Williams R / MA/volume values.
---
Backtest Summary (BTC/USD(Binance), 5 min, 24 Mar 2025 → 28 Apr 2025)
• Total P&L : +50.70 USD (+5.05 %)
• Max Drawdown : 31.93 USD (3.11 %)
• Total Trades : 198
• Win Rate : 55.05 % (109/89)
• Profit Factor : 1.288
• Commission : 0.01 % per trade
• Slippage : 0 ticks
Even in choppy March–April, this multi-filter approach nets +5 % with a robust risk profile, compared to –2.09 % and higher drawdown for Williams R alone.
---
Williams R Alone vs. Multi-Filter Version
• Total P&L :
– Williams R alone → –20.83 USD (–2.09 %)
– Multi-Filter → +50.70 USD (+5.05 %)
• Max Drawdown :
– Williams R alone → 62.13 USD (6.00 %)
– Multi-Filter → 31.93 USD (3.11 %)
• Total Trades : 543 vs. 198
• Win Rate : 60.22 % vs. 55.05 %
• Profit Factor : 0.943 vs. 1.288
---
Inputs & What They Control
- wrLen (14): Williams R look-back
- maType (EMA): Trend filter type (SMA, EMA, WMA, HMA)
- maLen (20): Moving-average period
- useChop (true): Toggle Choppiness Index filter
- ciLen (12): CI look-back length
- chopThr (38.2): CI threshold (below = trending)
- useVol (true): Toggle volume-above-average filter
- volMaLen (50): Volume MA period
- useBBW (false): Toggle Bollinger Band Width filter
- bbwMaLen (50): BBW MA period
- useST (false): Toggle Supertrend filter
- stAtrLen (10): Supertrend ATR length
- stFactor (3.0): Supertrend multiplier
- useSL (false): Toggle ATR-based SL/TP
- atrLen (14): ATR period for SL/TP
- slMult (1.5): SL = slMult × ATR
- tpMult (2.0): TP = tpMult × ATR
---
How to Read the Chart
- Blue arrow (Long): Williams R crosses above –80 + all enabled filters green
- Red arrow (Short) : Williams R crosses below –20 + all filters green
- Dashboard box:
- Top : position and equity
- Next : cumulative PnL in USD & %
- Middle : green/white dots for each filter (green=passing, white=disabled)
- Bottom : Williams R, MA, and volume current values
---
Usage Tips
- Add the script : Indicators → My Scripts → Williams R Zone Scalper v1.0 → Add to BTC/USD chart on 5 min.
- Defaults : Optimized for BTC/USD.
- Forex majors : Raise `chopThr` to ~42.
- Stocks/high-beta : Enable `useBBW`.
- Enable SL/TP : Toggle `useSL`; stop-loss = 1.5×ATR, take-profit = 2×ATR apply automatically.
---
Common Questions
- * Why not trade every Williams R reversal?*
Raw Williams R whipsaws in sideways markets. Choppiness and volume filters reduce false entries.
- *Can I use on 1 min or 15 min?*
Yes—adjust ATR length or thresholds accordingly. Defaults target 5 min scalping.
- *What if all filters are on?*
Fewer arrows, higher-quality signals. Expect ~10 % boost in average win size.
---
Disclaimer & License
Trading carries risk of loss. Use this script “as is” under the Mozilla Public License 2.0 (mozilla.org). Always backtest, paper-trade, and adjust risk settings to your own profile.
---
Credits & References
- Pine Script v6, using TradingView’s built-in `ta.supertrend()`.
- TradingView House Rules: www.tradingview.com
Goodluck!
BullByte
Cyclical CALL/PUT StrategyThis script identifies optimal CALL (long) and PUT (short) entries using a cyclical price wave modeled from a sine function and confirmed with trend direction via a 200 EMA.
Strategy Highlights:
Cycle-Based Signal: Detects market rhythm with a smoothed sinusoidal wave.
Trend Confirmation: Filters entries using a customizable EMA (default: 200).
Auto-Scaling: Wave height adjusts dynamically to price action volatility.
Risk Parameters:
Take Profit: Default 5% (customizable)
Stop Loss: Default 2% (customizable)
Signal Triggers:
CALL Entry: Price crosses above the scaled wave and in an uptrend
PUT Entry: Price crosses below the scaled wave and in a downtrend
Inputs:
Cycle Length
Smoothing
Wave Height
EMA Trend Length
Take Profit %
Stop Loss %
Visuals:
Gray line = Scaled Cycle Wave
Orange line = 200 EMA Trend Filter
Best For: Traders looking to make 1–2 high-probability trades per week on SPY or other highly liquid assets.
Timeframes: Works well on 2-min, 15-min, and daily charts.
TrendTwisterV1.5 (Forex Ready + Indicators)A Precision Trend-Following TradingView Strategy for Forex**
HullShiftFX is a Pine Script strategy for TradingView that combines the power of the **Hull Moving Average (HMA)** and a **shifted Exponential Moving Average (EMA)** with multi-layered momentum filters including **RSI** and **dual Stochastic Oscillators**.
It’s designed for traders looking to catch high-probability breakouts with tight risk management and visual clarity.
Chart settings:
1. Select "Auto - Fits data to screen"
2. Please Select "Scale Price Chart Only" (To make the chart not squished)
### ✅ Entry Conditions
**Long Position:**
- Price closes above the 12-period Hull Moving Average.
- Price closes above the 5-period EMA shifted forward by 2 bars.
- RSI is above 50.
- Stochastic Oscillator (12,3,3) %K is above 50.
- Stochastic Oscillator (5,3,3) %K is above 50.
- Hull MA crosses above the shifted EMA.
**Short Position:**
- Price closes below the 12-period Hull Moving Average.
- Price closes below the 5-period EMA shifted forward by 2 bars.
- RSI is below 50.
- Stochastic Oscillator (12,3,3) %K is below 50.
- Stochastic Oscillator (5,3,3) %K is below 50.
- Hull MA crosses below the shifted EMA.
---
## 📉 Risk Management
- **Stop Loss:** Set at the low (for long) or high (for short) of the previous 2 candles.
- **Take Profit:** Calculated at a risk/reward ratio of **1.65x** the stop loss distance.
---
## 📊 Indicators Used
- **Hull Moving Average (12)**
- **Exponential Moving Average (5) **
- **Relative Strength Index (14)**
- **Stochastic Oscillators:**
- %K (12,3,3)
- %K (5,3,3)
Dkoderweb repainting issue fix strategyHarmonic Pattern Recognition Trading Strategy
This TradingView strategy called "Dkoderweb repainting issue fix strategy" is designed to identify and trade harmonic price patterns with optimized entry and exit points using Fibonacci levels. The strategy implements various popular harmonic patterns including Bat, Butterfly, Gartley, Crab, Shark, ABCD, and their anti-patterns.
Key Features
Pattern Recognition: Identifies 17+ harmonic price patterns including standard and anti-patterns
Fibonacci-Based Entries and Exits: Uses customizable Fibonacci levels for precision entries, take profits, and stop losses
Alternative Timeframe Analysis: Option to use higher timeframes for pattern identification
Heiken Ashi Support: Optional use of Heiken Ashi candles instead of regular candlesticks
Visual Indicators:
Pattern visualization with ZigZag indicator
Buy/sell signal markers
Color-coded background to highlight active trade zones
Customizable Fibonacci level display
How It Works
The strategy uses a ZigZag-based pattern identification system to detect pivot points
When a valid harmonic pattern forms, the strategy calculates the optimal entry window using the specified Fibonacci level (default 0.382)
Entries trigger when price returns to the entry window after pattern completion
Take profit and stop loss levels are automatically set based on customizable Fibonacci ratios
Visual alerts notify you of entries and exits
The strategy tracks active trades and displays them with background color highlights
Customizable Settings
Trade size
Entry window Fibonacci level (default 0.382)
Take profit Fibonacci level (default 0.618)
Stop loss Fibonacci level (default -0.618)
Alert messages for entries and exits
Display options for specific Fibonacci levels
Alternative timeframe selection
This strategy is designed to fix repainting issues that are common in harmonic pattern strategies, ensuring more reliable signals and backtesting results.
Scalping 15min: EMA + MACD + RSI + ATR-based SL/TP📈 Strategy: 15-Minute Scalping — EMA + MACD + RSI + ATR-based SL/TP
This scalping strategy is designed for 15-minute charts and combines trend-following and momentum confirmation with dynamic stop loss and take profit levels based on volatility.
🔧 Indicators Used:
EMA 50 — identifies the main trend
MACD Histogram — confirms momentum direction
RSI (14) — filters overbought/oversold conditions
ATR (14) — dynamically sets SL and TP based on market volatility
📊 Entry Conditions:
Long Entry:
Price is above EMA 50
MACD histogram is positive
RSI is above 50 but below 70
Short Entry:
Price is below EMA 50
MACD histogram is negative
RSI is below 50 but above 30
🛑 Risk Management:
Stop Loss: 1×ATR (user-configurable)
Take Profit: 2×ATR (user-configurable)
These values can be adjusted in the script inputs depending on your risk/reward preference or market conditions.
⚠️ Notes:
Strategy is optimized for scalping fast-moving pairs (e.g. crypto, forex).
Works best in trending markets.
Use backtesting and forward testing before live trading.